﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true"
    CodeBehind="Create.aspx.cs" Inherits="QSAspMvc.Views.Product.Create" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
    <asp:PlaceHolder runat="server" id="mainScripts">
        <script src="<%=Url.Content("~/scripts/jquery-1.2.6.js") %>" type="text/javascript"></script>
        <script src="<%=Url.Content("~/scripts/jquery.validate-1.5.1.js") %>" type="text/javascript"></script>
        <script src="<%=Url.Content("~/scripts/jquery.validate.extensions.js") %>" type="text/javascript"></script>
        
        <%=ClientValidation.GenerateScripts("simpleForm", typeof(QSAspMvc.Models.Product)) %>
    </asp:PlaceHolder>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">


    
    <% Html.BeginForm("Create", "Product", FormMethod.Post, new { id = "simpleForm" });%>
    <fieldset>
        <legend>Simple Client Validated Form</legend>
        <p>
            All of this form's client side code was generated by the framework's JQueryGenerator.</p>
        <!-- a form id is required for client validation -->
        <ul style="list-style-type:none">
            <li>
                <label>
                    Product Name:
                </label>
                <%=Html.TextBox("ProductName")%>
                <%=Html.ValidationMessage("ProductName", "*")%>
            </li>
            <li>
                <label>
                    Unit Price:
                </label>
                <%=Html.TextBox("UnitPrice")%>
                <%=Html.ValidationMessage("UnitPrice", "*")%>
            </li>
            <li>
                <label>
                    Reorder Order:
                </label>
                <%=Html.TextBox("ReorderLevel")%>
                <%=Html.ValidationMessage("ReorderLevel", "*")%>
            </li>
            <li>
                <label>
                    Discontinued:
                </label>
                <%=Html.CheckBox("Discontinued")%>
                <%=Html.ValidationMessage("Discontinued", "*")%>
            </li>
            <li>
                <span class="message">
        <%=ViewData["Message"] %>
    </span>
                <%=Html.CustomValidationSummary() %>
                </li>
            <li>
                <input class="submit" type="submit" value="Submit" />
            </li>
        </ul>
    </fieldset>
    <% Html.EndForm(); %>
</asp:Content>
